package com.github.tangyi.auth.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * @author tangyi
 * @date 2019-03-15 11:53
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping(path = "/details", produces = "application/json" )
    public Principal userDetails(Principal principal) {
        return principal;
    }
}
